.TH "psnrcore" 1 "" ""


.SS NAME
.P
psnrcore \-\- Calculate the Peak\-Signal\-to\-Noise Ratio (PSNR) between the frames of two videos.

.SS SYNOPSIS
.P
\fBpsnrcore\fR [ \fIOPTIONS\fR ] \fB\-o\fR \fI/path/to/original/video/frames\fR
                     \fB\-c\fR \fI/path/to/comparison/video/frames\fR
                     \fB\-l\fR \fI/path/to/psnr/log.csv\fR

.SS DESCRIPTION
.P
psnrcore is a backend that calculates the PSNR between the frames from two video files. The frames must be in ppm format and numbered sequentially (000001.ppm, 000002.ppm, etc; mplayer can do this with the \fB\-vo pnm\fR option). The first video file is generally the original video, and the second is a modified version of the original. Often, the second video is encoded in a different codec (or the same codec, but with different options), or uses filters to improve or change the video. The aim of this script is to give concrete numbers to often subjective video quality comparisons.

.P
psnrcore sequentially compares frames from both videos, calculating the PSNR for each frame, and finally averages the overall PSNR for both videos. Frame\-by\-frame data are written to a comma separated values (.csv) file, while the final PSNR is returned to standard out.

.SS FEATURES
.RS
.IP \(bu 3
Calculates the PSNR for each frame and saves the data in a comma separated values (.csv) file.
.IP \(bu 3
Returns the average PSNR to standard out.
.RE

.SS OPTIONS
.SS Required Options
.TP
\fB\-o\fR, \fB\-original\fR \fI/path/to/original/video/frames\fR
Specify the path to the directory of frames from the original video file. The frames must be in ppm format and numbered sequentially (000001.ppm, 000002.ppm, etc).

.TP
\fB\-c\fR, \fB\-compare\fR \fI/path/to/comparison/video/frames\fR
Specify the path to the directory of frames from the comparison video file. The frames must be in ppm format and numbered sequentially (000001.ppm, 000002.ppm, etc).

.TP
\fB\-l\fR, \fB\-log\fR \fI/path/to/psnr/log.csv\fR
Specify the path (including the name) to a file to which the PSNR for each frame will be written. If the log doesn't exist, it will be created.

Recorded data: frame number, Y (or luminance) PSNR (dB), Cb (or blue chroma) PSNR (dB), Cr (or red chroma) PSNR (dB), whole frame PSNR (dB), frame PSNR error, cumulative error sum.

In cases where the images do not differ, the PSNR cannot be found (because the denominator is zero). Since the images are exactly the same, there is no 'noise', and the PSNR is infinite instead.

.SS Other Options
.TP
\fB\-h\fR, \fB\-help\fR
Display a usage guide and exit.

.TP
\fB\-v\fR, \fB\-version\fR
Print the version number and exit.

.SS EXAMPLES
.TP
psnrcore \-o ./orig\-frames \-c ./comp\-frames \-l $HOME/psnr\-log.csv
Use the frames in ./orig\-frames as the basis for the PSNR between those frames and ./comp\-frames. Store the frame\-by\-frame data in $HOME/psnr\-log.csv

.SS SEE ALSO
.P
\fBvidpsnr\fR(1), \fBprofile\fR(1)

.SS BUGS
.P
NONE (known)

.SS AUTHOR
.P
Streamlined and made robust by Joe Friedrichsen. Original idea and rough\-cut by Matthias Wieser.

.SS CONTACT
.P
Send bugs to vidprofile\-users@lists.berlios.de. Please see the vidprofile homepage (http://vidprofile.berlios.de) for further information.


.\" man code generated by txt2tags 2.3 (http://txt2tags.sf.net)
.\" cmdline: txt2tags -t man --infile=src/psnrcore.t2t --outfile=./psnrcore.man

